//
//  ScoreBaseTableViewCell.m
//  LiveSoftware
//
//  Created by lanou3g on 15/7/18.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "ScoreBaseTableViewCell.h"

@implementation ScoreBaseTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.baseScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, -1, kScreenWidth, 2000)];
        // kScreenHeight - 64 - kScreenIp6(40)
        self.baseScrollView.contentSize = CGSizeMake(kScreenWidth * 2, 0);
        self.baseScrollView.backgroundColor = [UIColor clearColor];
        
        // 添加 scrollview
        [self addScrollView];
        
        
        
        // 设置 cell 点击没有变化
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
    }
    return self;
}


- (void)addScrollView
{
    self.baseScrollView.contentOffset = CGPointMake(0, 0);
    self.baseScrollView.showsHorizontalScrollIndicator = NO;
    self.baseScrollView.bounces = NO;
    self.baseScrollView.pagingEnabled = YES;
    
    
    self.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, self.baseScrollView.bounds.size.height)];
    [self.baseScrollView addSubview:_leftView];
    
    self.rightView = [[UIView alloc] initWithFrame:CGRectMake(kScreenWidth, 0, kScreenWidth, self.baseScrollView.bounds.size.height)];
    [self.baseScrollView addSubview:_rightView];
    
    
    [self addSubview:_baseScrollView];
}



@end
